package lee.study.fanshe;

import java.util.HashMap;
import java.util.function.BiConsumer;


public class TestLambda1 {
    public static void main(String[] args) {
        HashMap<Integer, String> map = new HashMap<>();
        map.put(1, "lee");
        map.put(2, "shi");
        map.put(3, "song");
        map.put(4, "sang");
        map.forEach(new BiConsumer<Integer, String>() {
            @Override
            public void accept(Integer k, String v) {
                System.out.print(k + "" + v + " ");
            }
        });
        System.out.println();
        map.forEach((k, v) -> System.out.print(k + "" + v + " "));
    }
}
